package com.mbj.san;

import java.util.Scanner;
//7-2 寻找250 (5 分)
/*
public class test_3_9{
    public static void main(String[] args)
    {
        int input = 0;
        int t = 1;
        Scanner inn = new Scanner(System.in);
        while(true)
        {
            input = inn.nextInt();
            if(input == 250)
                break;
            t++;
        }

        System.out.println(t);
    }

}*/

//7-3 统计学生平均成绩与及格人数 (10 分)
/*public class test_3_9{
    public static void main(String[] args)
    {
        int input = 0;
        int cont = 0;//统计人数
        double sum = 0;//平均分
        Scanner inn = new Scanner(System.in);
        int t = 0;
        t = inn.nextInt();
        int i = 0;
        for(i = 0; i < t; i++)
        {
            input = inn.nextInt();
            if(input >= 60)
                cont++;
            sum += input;
        }

        System.out.printf("average = %.1f\n" +
                "77 54 92 73 60\n",(sum * 1.0) / t);
        System.out.printf("count = %d",cont);
    }

}*/

//7-4 求幂之和 (10 分)
/*public class test_3_9{
    public static void main(String[] args)
    {
        doublie input = 0;
        int sum = 0;//总分
        Scanner inn = new Scanner(System.in);
        int t = 0;
        t = inn.nextInt();
        int i = 0;
        for(i = 1; i <= t; i++)
        {
            input = Math.pow(2,i);

            sum += input;
        }

        System.out.printf("result = %d",sum);
    }

}*/

//7-5 最大公约数和最小公倍数 (10 分)
/*
public class test_3_9{
    public static void main(String[] args)
    {
        int n1 = 0;
        int n2 = 0;

        Scanner inn = new Scanner(System.in);

        n1 = inn.nextInt();
        n2 = inn.nextInt();

        int gy = 0;
        int gb = 0;
        if(n1 > n2)
        {
            gy = n2;
            gb = n1;
        }
        else
        {
            gy = n1;
            gb = n2;

        }
        System.out.printf("%d %d\n",gy, gb);

        int i = 0;
        for(i = gy; i >= 1; i--)
        {
            if(n1 % i == 0 && n2 % i == 0)
            {
                break;
            }
            gy--;
        }

        for(i = gb; i <= n1*n2; i++)
        {
            if(i % n1 == 0 && i % n2 == 0)
            {
                break;
            }
            gb++;
        }

        System.out.printf("%d %d",gy, gb);
    }

}*/

//7-6 约分最简分式 (15 分)
/*
public class test_3_9{
    public static void main(String[] args)
    {
        String str;
        int a = 0;
        int b = 0;
        int i = 0;
        Scanner inn = new Scanner(System.in);

        str = inn.nextLine();
        String[] s = str.split("/");
        inn.close();
        a = Integer.parseInt(s[0]);
        b = Integer.parseInt(s[1]);

        for(i = a; ;i--)
            if(a % i == 0 && b % i ==0)
                break;

        System.out.println(a/i + "/" + b/i);
    }

}*/

/*
public class test_3_9{
    public static void main(String[] args)
    {
        String str;
        int a = 0;
        int b = 0;
        int i = 0;
        Scanner inn = new Scanner(System.in);

        str = inn.nextLine();
        String[] s = str.split(":");
        //inn.close();
        a = Integer.parseInt(s[0]);
        b = Integer.parseInt(s[1]);

        if(a < 12)
            {
                System.out.printf("Only %02d:%02d.  Too early to Dang.", a,b);
            }
        else if(a == 12 && b == 0)
        {
            System.out.printf("Only 12:00.  Too early to Dang.");
        }
        else
        {
            for(i = 0; i < a;i++)
            {
                if(b > 0)a++;
                System.out.printf("Dang");

            }
        }

    }

}*/

//猜数字游戏
import java.util.Scanner;
/*

public class test_3_9{
    public static void main(String[] args)
    {
        int input = 0;
        int k = 0;
        int tmp = 0;
        Scanner inn = new Scanner(System.in);

        input = inn.nextInt();
        k = inn.nextInt();
        int i = 0;
        if(input < 0)
            System.out.println("Game Over");
        for(i = 1; i <= k; i++)
        {
            tmp = inn.nextInt();
            if(tmp > input)
                System.out.println("Too big");
            else if(tmp < input)
                System.out.println("Too small");
            else
            {
                if(k == 1)
                    System.out.println("Bingo!");
                else if(k <= 3)
                    System.out.println("Lucky You!");
                else
                    System.out.println("Good Guess!");
                return;
            }

        }

        System.out.println("Game Over");

    }

}*/
//自增自减
/*
public class test_3_9{
    public static void main(String[] args) {
        int c = 10;
        int d = 5;
        int res = c++ + ++c - --d - ++d + 1 + c--;
        //c   10 11 12            11
        //d   5  5      4   5
        //res 0  10 22  18  13 14 26
        System.out.println(c);
        System.out.println(d);
        System.out.println(res);

    }

}
*/

/*
public class test_3_9{
    public static void main(String[] args)
    {
       */
/* int a = 10;
        int b = 2;
        int c = 5;
         a *= b + c;
        System.out.println(a);*//*


        byte n1 = 10;
        byte n2 = 5;
        //因为整形的字面量 默认类型是 int
        //想要要结果 赋给 byte类型的变量需要
        //强制类型转换
      //  n1 = (byte)(n1 + n2);
        n1 += n2;//但符合运算符就可以简单许多

    }

}
*/
//逻辑运算符
/*public class test_3_9{
    public static void main(String[] args)
    {
        double a = 16.8;
        int b = 5;
        System.out.println(a >= 15 && b >=5);

    }

}*/
//三木操作符
/*public class test_3_9{
    public static void main(String[] args)
    {
        int a = 59;
        //输出是字符串，所以用字符串类型来接收
        String rs = a >= 60 ? "考试通过" : "挂科";
        System.out.println(rs);
    }

}*/

//三木运算符的实例
//找出三个整数中的最大值
/*public class test_3_9{
    public static void main(String[] args)
    {
        int a = 20;
        int b = 10;
        int c = 70;

        int max = a > b ? a : b;
        max =  max > c ? max :  c;
        System.out.println(max);//70

    }

}*/

public class test_3_9{
    public static void main(String[] args)
    {


    }

}

/*
public class test_3_9{
    public static void main(String[] args)
    {


    }

}
*/
